﻿app.controller('AlertController', ['$scope', 'AlertService', function ($scope, AlertService) {
    $scope.alerts = AlertService.getAlerts();

    //$scope.addAlert = function () {
    //    $scope.alerts.push({ msg: 'Another alert!' });
    //};

    $scope.closeAlert = function (index) {
        AlertService.removeAlert(index);        
    };
}]);